home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2434 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. Path: coke.engr.utk.edu!mbk
  2. From: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel)
  3. Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
  4. Subject: Re: type checking in C++ was Re: Hungarian notation
  5. Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
  6. Date: 17 Jan 1996 20:20:30 GMT
  7. Organization: University of Tennessee, Knoxville
  8. Message-ID: <4djlme$kf3@gaia.ns.utk.edu>
  9. References: <4cf8hf$8fe@hopi.gate.net> <DKoBrn.CHs@falcon.daytonoh.attgis.com> <4d1j37$ge8@stc06.ctd.ornl.gov> <9601221.15716@mulga.cs.mu.OZ.AU>
  10. Reply-To: kennel@msr.epm.ornl.gov
  11. NNTP-Posting-Host: 128.169.100.253
  12. X-Newsreader: TIN [version 1.2 PL2]
  13.  
  14. Fergus Henderson (fjh@munta.cs.mu.OZ.AU) wrote:
  15. : mbk@jt3ws1.etd.ornl.gov (Kennel) writes:
  16.  
  17. : >Dick Menninger (Dick.Menninger@DaytonOH.ATTGIS.COM) wrote:
  18. : >> The purpose of C++ in its design
  19. : >> and evolution has been to hide implementation while
  20. : >> providing genuinely heavy duty compile-time type checking.
  21. : >
  22. : >Is the goal actually achieved?  "heavy duty compile-time type-checking?"
  23.  
  24. : No; the need for backwards compatibility means that it will never be
  25. : fully achieved.
  26.  
  27. : >At one point something like this could be a problem.  It it still?
  28. : >
  29. : >function(Type *p) {
  30. : >
  31. : >// One of this may silently crash or do bad things.  Both typecheck. 
  32. : >
  33. : >//    delete p;
  34. : >//    delete [] p; 
  35. : >
  36. : >}
  37.  
  38. : Yes, that is still a problem.  However, it is less of a problem than
  39. : it used to be, because there is now a standard `vector<T>' class
  40. : which can be used instead of C's builtin arrays.
  41.  
  42. That's good to hear.  Is this widely implemented?  Is it as efficient
  43. as built-in arrays?  Can it handle value types as T as well as pointers? 
  44.  
  45. Of course I think it's rather inappropriate to name something a "vector" if it
  46. doesn't have elements which have group structure and have the appropriate
  47. invariant properties.  "array" is perfectly correct and well used.
  48.  
  49. : --
  50. : Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  51. : fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  52.